package com.lnsystem.model;

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

@Entity
@Table(name="ANALYTICSEVENT")
public class AnalyticsEvent {


	@Id
	@Column(name="ID")
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="ANALYTICS_EVENT_SEQUENCE")
	@SequenceGenerator(
		    name="ANALYTICS_EVENT_SEQUENCE",
		    sequenceName="ANALYTICS_EVENT_SEQUENCE",
		    allocationSize=20
		)
	private Integer id;
	
	@ManyToOne(fetch = FetchType.LAZY,  cascade = {CascadeType.ALL})
	@JoinColumn(name = "STOCKID", nullable = false) 
	private Stock stockId;
	
	
	@OneToOne(fetch = FetchType.LAZY,  cascade = {CascadeType.ALL})
	@JoinColumn(name = "STOCKDAILYID", nullable = false) 
	private StockDailyData stockDailyId;
			
	@Column(name="SYMBOL")
	private String symbol;
	
	@Column(name="EVENTTYPE")
	private String eventType;
	
	@Column(name="DETAILS")
	private String details;
	
	@Column(name="RANK")
	private Integer rank;

	@Column(name="CREATEDON")
	private Date createdOn;

	@Column(name="PRICEPIVOTPOSITION")
	private String pricePivotPosition;
	
	@Column(name="RISKREWARD")
	private Double riskReward;
	
	@Column(name="RISK")
	private Double risk;
	
	@Column(name="REWARD")
	private Double reward;
	
	@Column(name="PRICEONEVENT")
	private Double priceOnEvent;
	
	@Column(name="CURRENTPRICE")
	private Double currentPrice;
	
	@Column(name="PRICECHANGESINCEEVENT")
	private Double priceChangeSinceEvent;
	
	@Column(name="PRICECHANGEPERCENTSINCEEVENT")
	private Double priceChangePercentSinceEvent;
	
	
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Stock getStockId() {
		return stockId;
	}

	public void setStockId(Stock stockId) {
		this.stockId = stockId;
	}

	public StockDailyData getStockDailyId() {
		return stockDailyId;
	}

	public void setStockDailyId(StockDailyData stockDailyId) {
		this.stockDailyId = stockDailyId;
	}

	public String getSymbol() {
		return symbol;
	}

	public void setSymbol(String symbol) {
		this.symbol = symbol;
	}

	public String getEventType() {
		return eventType;
	}

	public void setEventType(String eventType) {
		this.eventType = eventType;
	}

	public String getDetails() {
		return details;
	}

	public void setDetails(String details) {
		this.details = details;
	}

	public Integer getRank() {
		return rank;
	}

	public void setRank(Integer rank) {
		this.rank = rank;
	}

	public Date getCreatedOn() {
		return createdOn;
	}

	public void setCreatedOn(Date createdOn) {
		this.createdOn = createdOn;
	}

	public String getPricePivotPosition() {
		return pricePivotPosition;
	}

	public void setPricePivotPosition(String pricePivotPosition) {
		this.pricePivotPosition = pricePivotPosition;
	}

	public Double getRiskReward() {
		return riskReward;
	}

	public void setRiskReward(Double riskReward) {
		this.riskReward = riskReward;
	}

	public Double getRisk() {
		return risk;
	}

	public void setRisk(Double risk) {
		this.risk = risk;
	}

	public Double getReward() {
		return reward;
	}

	public void setReward(Double reward) {
		this.reward = reward;
	}

	public Double getPriceOnEvent() {
		return priceOnEvent;
	}

	public void setPriceOnEvent(Double priceOnEvent) {
		this.priceOnEvent = priceOnEvent;
	}

	public Double getCurrentPrice() {
		return currentPrice;
	}

	public void setCurrentPrice(Double currentPrice) {
		this.currentPrice = currentPrice;
	}

	public Double getPriceChangeSinceEvent() {
		return priceChangeSinceEvent;
	}

	public void setPriceChangeSinceEvent(Double priceChangeSinceEvent) {
		this.priceChangeSinceEvent = priceChangeSinceEvent;
	}

	public Double getPricePercentChangeSinceEvent() {
		return priceChangePercentSinceEvent;
	}

	public void setPricePercentChangeSinceEvent(Double priceChangePercentSinceEvent) {
		this.priceChangePercentSinceEvent = priceChangePercentSinceEvent;
	}
	
}
